﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WcfServer.Classes.Utility;

namespace WcfServer.Classes.Server
{
    [Serializable]
    public class ConnectionRequest
    {
        public String srcName { set; get; }
        public byte[] EncryptedDstName { set; get; }

        public ConnectionRequest(byte[] data)
        {
            var r = SerializerHandler<ConnectionRequest>.DeSerializeInput(data);
            this.srcName = r.srcName;
            this.EncryptedDstName = r.EncryptedDstName;
        }

        public ConnectionRequest()
        {

        }

        public byte[] Send()
        {
            var r = SerializerHandler<ConnectionRequest>.SerializeInput(this);
            return r;
        }
    }
}
